<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>typeof</title>

</head>
<body>
<script>
    //number类型
    var a = 1;
    var b = 1.9;
    var c = NaN;
    //    数据输出到页面
    document.write(a + "<br>");
    document.write(b + "<br>");
    document.write(c + "<br>");
    document.write(typeof (a));
    //string类型
    //
    var e = "中国人";
    var f = "a";
    document.write(e + "<br>");
    document.write(f + "<br>");
    document.write(typeof (e));

    //boolean类型
    var g=true;
    var h=1>2;
    document.write(g+ "<br>");
    document.write(h+ "<br>");
    document.write(typeof (g));

    //null类型
    var j=null;
    document.write(j+ "<br>");
    document.write(typeof (j));

    //undefined类型
    var i; //undefined
    var k=undefined;
    document.write(i + "<br>");
    document.write(k + "<br>");
    document.write(typeof (i));



</script>
</body>
</html>